package com.freework.util.listUtil.group.Aggregate;

import java.math.BigDecimal;
import java.util.Map;

import com.freework.util.NumberUtil;
import com.freework.util.listUtil.group.AggregateCol;

public class SumData implements AggregateData {
	AggregateCol col;
	
	public void setCol(AggregateCol col) {
					this.col = col;
	}
	
	public void setData(Map sourceMap, Map groupMap,String tagertName) {
			BigDecimal sum =NumberUtil.add(groupMap.get(tagertName), sourceMap.get(col.sourceName));
			groupMap.put(tagertName, sum);
		
		
	}



	public String getName() {
		return "sum";
	}

	public AggregateData newAggregateData(String[] args) {
		// TODO Auto-generated method stub
		return new SumData();
	}


}
